package com.cam.generator.component;

import org.apache.velocity.app.Velocity;
import org.springframework.stereotype.Component;

import java.util.Properties;

@Component
public class VelocityTemplate {

    public VelocityTemplate () {
        Properties p = new Properties();
        p.setProperty(Velocity.RESOURCE_LOADERS, "webapp");
        p.setProperty("resource.loader.webapp.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
        p.setProperty("resource.loader.webapp.path", "classpath:/WEB-INF/resources/vms/");
        Velocity.init(p);
    }
}
